Home:ALL Converter>Debugging in Google App Engine Python Sandbox

Debugging in Google App Engine Python Sandbox

Ask Time:2012-06-22T04:30:06         Author:ncemami

Json Formatter

I am just starting to use Python GAE in Windows 7. Based on my observations, it seems like changes that I make to the python scripts in my local app engine directory do not show up when I launch the code to my 'localhost:XXXX' sandbox.

For example, I'll import one of my scripts and invoke some functions, and I get the error below.
The weird thing about this error is that the 'exec()' call is no longer at line 99 in the copy of 'main.py' that I have been revising.

Traceback (most recent call last):
  File "/base/data/home/apps/[app name]/1.354953192642593048/main.py", line 99, in post
    exec(cmd, safe_globals)
  File "<string>", line 5, in <module>
NameError: name 'myFunction' is not defined

I guess my questions are:
1) What/where is '/base/data/home/apps/[app name]/1.354953192642593048/main.py'? Is this where they compile and run everything?
2) How can I 'rebuild' the local copy of my app folder such that the revisions I make are reflected in the sandbox?

Sorry for this relatively vague question. If somebody could explain how the sandbox is setup so I can figure out how to properly do debugging I would appreciate it.


UPDATE:

Never figured out how / why this error occurred. The output from that app engine directory was totally static no matter what kind of changes I tried to make, so I just deleted the folder and opened a new one. With this new folder (same exact contents, including app.yaml and main.py), I can make changes on the fly and my local debugger reflects those changes.

No longer a pressing issue, but if anybody has an idea as to how / why this error was occuring, I would be interested to hear it. As suggested in the comments below, the path provided in the error message is highly indicative of the workings of some remote base/ directory, even though I have been running everything on my localhost:[Port#] without any app deployment.

Author:ncemami,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/11146254/debugging-in-google-app-engine-python-sandbox
yy